﻿Public Interface iPrettyListItem
  ''' <summary>
  ''' A flag the list item is responsible for maintaining that indicates if the item is selected.  Always return false is the item is not selectable.
  ''' </summary>
  Property IsSelected() As Boolean

  ''' <summary>
  ''' Stores the current rectangle where a click is valid for this object
  ''' </summary>
  Property ClickRectangle() As Rectangle

  ''' <summary>
  ''' Used to determine if item should be included when the list is being filtered.  The string will be in upper case when passed to this function, for a case insensitive match.
  ''' </summary>
  ''' <param name="filter">The string being used to filter - upper case string!</param>
  ''' <value></value>
  ''' <returns>True indicates that the item IS included; False indicates it should be filtered out.</returns>
  ReadOnly Property FilterIsIncluded(ByVal filter As String) As Boolean

  ''' <summary>
  ''' Should return the height of the DrawPrettyListItem operation to come.  This is an optimization so that for large lists, offscreen drawing
  ''' is not done which will slow the list down significantly (in either fixed or dynamic height mode).  It is recommended to store the result
  ''' in a static variable and only perform actual calculations if the size changes due to variables changing values.
  ''' </summary>
  ''' <param name="g">Graphics object used for drawing</param>
  ''' <param name="dpiFactor">This is the multiplication factor used to normalize the graphics based on the DPI.  This number is the difference
  ''' of Current_DPI/192.  Why 192?  Because that's the DPI of VGA/WVGA devices.  So for QVGA devices, this number will be 0.5.</param>
  ''' <returns>Actual height of list item</returns>
  Function DrawPrettyListItemHeight(ByVal g As Drawing.Graphics, ByVal dpiFactor As Single) As Integer

  ''' <summary>
  ''' Draws the individual list item
  ''' </summary>
  ''' <param name="g">Graphics object used for drawing</param>
  ''' <param name="dpiFactor">This is the multiplication factor used to normalize the graphics based on the DPI.  This number is the difference
  ''' of Current_DPI/192.  Why 192?  Because that's the DPI of VGA/WVGA devices.  So for QVGA devices, this number will be 0.5.</param>
  ''' <param name="colors">Suggested colors to use when painting the item</param>
  ''' <param name="rect">Maximum rectangle area to draw to</param>
  ''' <param name="isAlternate">Simple flag that indicates if this is an "alternate" line (as in, every odd index) so that you can have
  ''' different backgrounds for odd/even lines.  This is completely optional.</param>
  Sub DrawPrettyListItem(ByVal g As Drawing.Graphics, ByVal dpiFactor As Single, ByVal colors As PrettyList.ListColors, ByVal rect As Rectangle, ByVal isAlternate As Boolean)

  ''' <summary>
  ''' This sub is called when a standard click (mousedown then mouseup) occurs, without any scrolling happening in between and without stopping a kinetic scroll.
  ''' </summary>
  Sub OnMouseClick()

  ''' <summary>
  ''' This sub is called when a long press click (mousedown, hold, then mouseup) occurs, without any scrolling happening in between and without stopping a kinetic scroll.
  ''' </summary>
  Sub OnMouseLongClick()

  ''' <summary>
  ''' This sub is called when a finger touches an item immediately, and is always called, even if scrolling occurs.
  ''' </summary>
  Sub OnMouseDown()

  ''' <summary>
  ''' This sub is called when a finger is released from an item, and is always called, even if scrolling occurs.
  ''' </summary>
  Sub OnMouseUp()

  ''' <summary>
  ''' This sub is called immediately before scrolling begins to the item that is currently pressed down (last call to OnMouseDown).
  ''' </summary>
  Sub OnMouseScroll()
End Interface
